<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      width: 400px;
      height: 400px;
      background-color: red ;
      /* 元素整体透明度 */
      /* opacity: 1; */
      /* opacity: 0; */
      opacity: .5;
    }

  </style>
</head>
<body>
  <div>
    <img src="./images/1.jpg" alt="">
    我是内容
  </div>
</body>
</html>